<?php
	class PaidListingsAppController extends AppController
	{
		function beforeFilter()
		{
                        //@todo activate this check.
			if(!checkSessionKey('paid_listings'))
			{
				if(isset($this->params['admin']) && $this->params['admin'])
				{
					$this->warningMsg(__("You haven't entered a license for Paid listings addon yet. Please add the license."));
					$this->redirect('/admin/config/generic_config/setting/License');
				}else
				{
					$this->errorMsg(__("Invalid URL"));
					$this->redirect('/');
				}
			}
			if((!isset($this->params['admin']) || !$this->params['admin']) && !cr("PaidListingConfig.status"))
			{
				$this->redirect('/');
			}
			$this->helpers[] = "PaidListings.PlanDisplay";
			parent::beforeFilter();
		}
	}
?>